package cn.com.shaom.learning.sb.web.data.jdbc.service;

import cn.com.shaom.learning.sb.web.data.jdbc.User;
import cn.com.shaom.learning.sb.web.data.jdbc.dao.IUserDao;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author Shaom
 */
@Service
@Transactional(rollbackFor = Exception.class)
public class UserServiceImpl implements IUserService {

    @Resource
    private IUserDao userDao;

    @Override
    public List<User> getAll() {
        return userDao.getAll();
    }
}